package com.zyd.blog.persistence.mapper;

import com.zyd.blog.persistence.beans.*;
import org.springframework.data.repository.query.Param;
import tk.mybatis.mapper.common.BaseMapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author liusongqi
 * @since 2020-03-05
 */
public interface FineArtMapper extends BaseMapper<FineArt> {
    List<FineArtNew> soft(@Param(value = "userId") String userId,int page,int count);

    List<FineArtNew> personalSoft(@Param(value = "userId") String userId,int page,int count);

    List<FineArtNew> personalSoftOrder(@Param(value = "userId") String userId,int page,int count,String coverUserId);
    /**    根据规则 变换 获取软装产品
     *      region 0省  1 市  2区  3全国  4 全省  5 全市
     *      sort  19智能排序  20 时间优先 21 点赞优先  22 热度优先
     *      style 只要不为空 直接传过去 就可
     */
    List<FineArtNew> sort(@Param(value = "region") String region, @Param(value = "sort") String sort, @Param(value = "style") String style
            ,@Param(value = "province")String province,@Param(value = "city")String city,@Param(value = "area")String area,
                          @Param(value = "userId") String userId,String place);

    List<FineArtNew> searchDesign(String value,@Param(value = "userId") String userId,int page,int count);
    Integer searchCount(String value);
    Integer searchCountAll(String value);
    Integer fabulous(@Param(value = "id") String id);

    Integer reduceZan(@Param(value = "softId") String softId);

    Integer addCollection(@Param(value = "id") String id);

    Integer deleteCollection(@Param(value = "id") String id);

    void commentNum(@Param(value = "designId") String designId);

    void commentReduce(@Param(value = "designId") String designId);

    List<FineArtNew> recommendArticle(String userId,String id);

    FineArtNew specific(@Param(value = "fineId") String fineId, @Param(value = "userId") String userId);

    List<Product> product(@Param(value = "id") String id);

    List<FineArtNew> myAddFine(String userId,int page,int count);

    List<Caogao> myDraft(String userId,int page,int count);

    List<FineArtNew> index(@Param(value = "userId") String userId,int page,int count);

    Integer caoGaoNum();

    Integer upodateOne(String fineId,String fineImage,String productId,String fineContent,String draft,
                       String fineTitle ,String addTime,String topTime);

    Integer deleteArticle(String id);

    void userCount(String id);


    Integer stopUser(String userId);

    Integer passUser(String userId);
}
